#pragma once
#include <vector>

#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Property/PropertyBase.h"


SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
/** @brief 标准梁截面
 *
 * 预定义的截面形状。通过 \ref BeamSectionTypes "梁截面（形状）标准类型"和对应的几何尺寸定义截面形状
 */
struct DECLSPEC PBRSECTData : public PropertyBase
{
    struct inpOrg
    {
        SG::DataStructure::Common::Id EXTID = 0;
        SG::DataStructure::Common::Id ID = 0;
    };

    struct section
    {
        SG::DataStructure::Common::Real OHEIGHT = 0.0;
        SG::DataStructure::Common::Real OWIDTH = 0.0;
        std::vector<inpOrg>             inps;
        std::vector<inpOrg>             ings;
    };

    SG::DataStructure::Common::Id   m_MID = 0;
    SG::DataStructure::Common::Id   m_FORM = 0;
    SG::DataStructure::Common::Id   m_RECLEN = 0;
    SG::DataStructure::Common::Real m_NSM = 0.0;
    SG::DataStructure::Common::Id   m_OUTP = 0;
    SG::DataStructure::Common::Id   m_OUTG = 0;
    SG::DataStructure::Common::Id   m_OUTM = 0;
    std::vector<section>            m_sections;
    SG::DataStructure::Common::Id   m_domainId = 0;
};

/// @brief 判断单元数据是否相等
DECLSPEC bool operator== (const PBRSECTData& val1, const PBRSECTData& val2);
DECLSPEC bool operator== (const PBRSECTData::inpOrg& val1, const PBRSECTData::inpOrg& val2);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE